dopus request '"'getcatstr(20,'This is an archive in an archive.'lf||lf'Extract it to'lf"'%s'"lf'and then list it?',destpath)'"' getcatstr(21,'Extract|Cancel')
if ~rc then
call quitit
address command 'LhA e -q -x2 -a -C0 -Qo "'patch(lhafile,0)'" "'destpath'" "'patch(lhasubdir||selentry,1)'"'
if rc>0 then
call quitit(getcatstr(11,'Error while extracting from archive.'))
lister read desthandle '"'destpath'"' force
lhafile=destpath||selentry
end
else
lhafile=winpath||selentry
lhadir=1
lhasubdir=''
listlha=1
end
lister select handle '"'selentry'"' off
lister refresh handle
if lhadir then do
if cmd='BROWSE' then do
oldhandle=handle
/* The Following makes LhaDir open it's own lister window. Uncomment to make this true */
/* lister new */
/* handle=result */
lister set handle title getcatstr(0,'LhADir listed archive')
lister set handle title getcatstr(0,'LhADir listed archive')
end
call showlhadir
end
else
if cmd='BROWSE' then
command scandir new winpath
else do
if entries=0 then
winpath=''
command scandir winpath
end
return
dodelete:
askdelete=1
if lhadir then do
if entries=0 then
call quitit
if notmove then do
lister set handle busy on
if askdelete then do
lister query handle numselfiles
nfiles=result
lister query handle numseldirs
ndirs=result
dopus request '"'getcatstr(5,'Warning: you cannot get back'lf'what you delete! OK to delete:'lf||lf'%s file(s) and'lf'%s drawer(s) (and their contents)?',nfiles,ndirs)'"' getcatstr(6,'Proceed|Cancel')